Abstract: I propose a distributionally robust principal-agent formulation, which generalizes some common variants of worst-case and Bayesian principal-agent problems. With this formulation, I first construct a theoretical framework to certify whether any surjective contract family is optimal, and quantify its sub-optimality. The framework and its proofs rely on a novel construction and comparison of several related optimization problems. I then operationalize the framework to study the optimality of simple — affine and linear — contract menus. By this framework, the optimality gap of a contract menu is broken down into an adjustability gap and an information rent. It can be shown that, with geometric intuition, these simple contracts tend to be close to optimal when the social value of production is convex in production cost. I also provide succinct and closed-form expressions to quantify the optimality gap when the social value function is concave. These results shed light on the technical root of a higher-level question — why are there more positive results in the literature in terms of a simple menu’s optimality in a robust (worst-case) setting rather than in a stochastic (Bayesian) setting? It seems that the answer relates to two facts: the sum of quasi-concave functions is not quasi-concave in general; the maximization operator and the expectation operator do not commute in general. Overall, this study is among the first to cross-pollinate the contract theory and optimization literature. This new theoretical framework also re-proves some recent results in a unified way: Carroll (American Economic Review 2015), Dütting, Roughgarden, and Talgam-Cohen (Economics and Computation 2019), Yu and Kong (Operations Research 2020), Li et al (Management Science 2022).